﻿<Window x:Class="Samcrypt.PageWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="PageWindow" Height="412" Width="476"
        WindowStyle="ToolWindow">
    <Grid>


        <Grid Name="documentGrid" Grid.Column="0" Margin="15,10,15,5">

            <Grid.RowDefinitions>
                <RowDefinition Height="60" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Border Name="docHeaderBorder" Grid.Row="0" BorderBrush="Black" BorderThickness="1,1,1,0" CornerRadius="5,5,0,0"
                        Background="{StaticResource docHeaderBackground}"
                        HorizontalAlignment="Left"
                        >


                <Grid Name="docHeaderGrid" MaxWidth="500"  >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="*" MinWidth="200"  />

                        <ColumnDefinition  Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <Border Name="docTitleBorder" Grid.Column="0" VerticalAlignment="Center"  Padding="4,0,4,1" Margin="15,0,6,0" 
                                
                                           
                                        Style="{StaticResource docTitleBorderStyle1}"
                                        >
                        <TextBox x:Name="textBox2"  FontSize="17"  Background="Transparent" BorderBrush="Transparent"
                                                 Text="{Binding Path=Title, UpdateSourceTrigger=PropertyChanged}" 
                                                 SpellCheck.IsEnabled="{Binding ElementName=spellingCheckBox, Path=IsChecked}"
                                                 />
                    </Border>

                    <StackPanel Name="docDateTimePanel" Grid.Column="2" 
                                    VerticalAlignment="Center"  HorizontalAlignment="Right"
                                    Margin="20,0,0,0"
                                            >
                        <TextBlock Margin="0,4,15,0" 
                                               Text="{Binding Path=LastModifed, 
                                               Converter={StaticResource formatter}, ConverterParameter=' \{0:MMMM d, yyyy\}'}" 
                                               Style="{StaticResource docDateTimeStyle1}"/>
                        <TextBlock Margin="0,0,15,0" 
                                               Text="{Binding Path=LastModifed, 
                                               Converter={StaticResource formatter}, ConverterParameter=' \{0:h:mm tt\}'}"
                                               Style="{StaticResource docDateTimeStyle1}"/>
                    </StackPanel>
                </Grid>

            </Border>

            <Border Grid.Row="1"  BorderBrush="Black" BorderThickness="1,1,1,1" CornerRadius="0,5,5,5" Padding="5"
                        MinHeight="100">

                <TextBox x:Name="docBodyTextBox"  AcceptsReturn="True" 
                                         VerticalScrollBarVisibility="Auto"  
                                         HorizontalScrollBarVisibility="Auto"
                                     Margin="1,0,0,0"
                                        Text="{Binding Path=Text, UpdateSourceTrigger=PropertyChanged}"
                                     
                                     TextWrapping="NoWrap"
                                     FontSize="14" FontFamily="Courier New"
                                     SpellCheck.IsEnabled="{Binding ElementName=spellingCheckBox, Path=IsChecked}"
                                         
                                     
                                             
                                     >

                </TextBox>

            </Border>

            <GridSplitter Name="docHeaderSplitter" Grid.Row="0" Background="Transparent" Height="3" 
                                      HorizontalAlignment="Stretch" VerticalAlignment="Bottom" />

        </Grid>


    </Grid>
</Window>
